USE [BMIG_Mensual_POST_CADENA]
GO

IF EXISTS (SELECT name FROM   sysobjects  WHERE  name = N'[dbo].[WASP_M0014_COMUNAS]'  AND  type = 'P')
    DROP PROCEDURE [dbo].[WASP_M0014_COMUNAS]
GO

CREATE PROCEDURE [dbo].[WASP_M0014_COMUNAS]
AS

BEGIN 
		SELECT 
			COM.Z07310DSC as COMUNATRAB,
			CCOM.Z07326NDO AS Z07326NDO

		INTO DBO.comunas

		FROM 
			z07326 CCOM (nolock),
			z07310  COM (nolock)

		WHERE
			CCOM.Z07310COM = COM.Z07310COM 

END

